<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            color: red;
        }
        p{
            /*提升当前样式的优先级为最高*/
            color: blue !important;
        }
        /*id选择器优先级最高*/
        #p1{color: green}
    </style>
</head>
<body>
<p id="p1">p1</p>
<div>
  div
  <p>p2</p>
  <span>span</span>
  <a href="">超链接</a>
</div>
</body>
</html>